package po.car;

import java.time.LocalDateTime;
import java.util.Arrays;

import po.emp.Empoyee;

/**
 * 汽车保养记录
 * @author admin
 *
 */
public class UpKeepRecord {
	private int keepId;
	private Car car;
	private LocalDateTime keepTime;  //保养时间
	private int keepMoney;  // 花费的保养费
	private String[] keepContent;  // 保养内容
	private Empoyee keepEmp;   //保养负责人
	
	public UpKeepRecord() {
		super();
	}
	public UpKeepRecord(int keepId, Car car, LocalDateTime keepTime, int keepMoney, String[] keepContent,
			Empoyee keepEmp) {
		super();
		this.keepId = keepId;
		this.car = car;
		this.keepTime = keepTime;
		this.keepMoney = keepMoney;
		this.keepContent = keepContent;
		this.keepEmp = keepEmp;
	}
	public int getKeepId() {
		return keepId;
	}
	public void setKeepId(int keepId) {
		this.keepId = keepId;
	}
	public Car getCar() {
		return car;
	}
	public void setCar(Car car) {
		this.car = car;
	}
	public LocalDateTime getKeepTime() {
		return keepTime;
	}
	public void setKeepTime(LocalDateTime keepTime) {
		this.keepTime = keepTime;
	}
	public int getKeepMoney() {
		return keepMoney;
	}
	public void setKeepMoney(int keepMoney) {
		this.keepMoney = keepMoney;
	}
	public String[] getKeepContent() {
		return keepContent;
	}
	public void setKeepContent(String[] keepContent) {
		this.keepContent = keepContent;
	}
	public Empoyee getKeepEmp() {
		return keepEmp;
	}
	public void setKeepEmp(Empoyee keepEmp) {
		this.keepEmp = keepEmp;
	}
	@Override
	public String toString() {
		return "UpKeepRecord [keepId=" + keepId + ", car=" + car + ", keepTime=" + keepTime + ", keepMoney=" + keepMoney
				+ ", keepContent=" + Arrays.toString(keepContent) + ", keepEmp=" + keepEmp + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + keepId;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UpKeepRecord other = (UpKeepRecord) obj;
		if (keepId != other.keepId)
			return false;
		return true;
	}
	
}
